FROM ubuntu:16.04
RUN apt-get update
RUN apt-get upgrade --assume-yes
RUN apt-get install --assume-yes perl  mc re2c g++ g++-multilib wget  sudo  python

ARG user=test

RUN useradd --create-home --no-log-init --shell /bin/bash ${user} \
    && adduser ${user} sudo \
    && echo "${user}:1" | chpasswd


RUN apt-get install --assume-yes bison gcc make build-essential libc6-dev-i386 libncurses-dev  coreutils diffstat chrpath cpio gawk git git-core help2man libtool libxml2-dev quilt sed subversion  texi2html texinfo unzip flex libtinfo5  unzip texinfo gcc-multilib u-boot-tools socat  python3 python3-pip python3-pexpect  xz-utils debianutils iputils-ping zlib1g-dev   xsltproc lib32z1

RUN update-alternatives --install /usr/bin/python  python /usr/bin/python2  2700
RUN update-alternatives --install /usr/bin/python  python /usr/bin/python3  3600

# USER builder
USER  ${user}

#RUN locale-gen en_US.UTF-8
#RUN export LANG=en_US.UTF-8
